package com.waylau.spring.cloud.weather.service;

import com.waylau.spring.cloud.weather.vo.Forecast;
import com.waylau.spring.cloud.weather.vo.Weather;
import com.waylau.spring.cloud.weather.vo.WeatherResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class WeatherReportServiceImpl  implements  WeatherReportService{


    @Autowired
    private  DataLient dataLient;

    @Override
    public Weather getDataByCityId(String cityId) {
        WeatherResponse weatherResponse = dataLient.getBycityId(cityId);
        Weather weather = weatherResponse.getData();
        return weather;
    }
}
